home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-in_the_mag-
/
reader_requests
/
dice_v3.15
/
lib
/
fd
/
makefd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-26
|
660b
|
35 lines
/*
* MAKEFD.C
*
* (c)Copyright 1992-1997 Obvious Implementations Corp. Redistribution and
* use is allowed under the terms of the DICE-LICENSE FILE,
* DICE-LICENSE.TXT.
*
* Used by routines that want to get into our low level io system. If exec
* is NULL then handle is an AmigaDOS file handle. If exec is not NULL then
* it is a function capable of executing ioctls.
*/
#include <stdio.h>
#include <fcntl.h>
int
MakeFd(handle, flags, exec)
long handle;
long flags;
long (*exec)();
{
int fd;
_IOFDS *d = _MakeFD(&fd);
d->fd_Fh = handle;
d->fd_Flags = flags | O_ISOPEN;
d->fd_Exec = exec;
return(fd);
}